
export const Describe = (rule, value, callback) => {
    if (!value) {
        return callback(new Error('描述不能为空'));
    }
};

export const Title = (rule, value, callback) => {
    if (!value) {
        return callback(new Error('描述不能为空'));
    }
};

export const User = (rule, value, callback) => {

  if (!value) {
    return callback(new Error('投放用户不能为空'));
  }
};

export const Userfiel = (rule, value, callback) => {

  if (!value) {
    return callback(new Error('请上传文件'));
  }
};



export const Type = (rule, value, callback) => {
    if (!value) {
        return callback(new Error('优惠券类型不能为空'));
    }
};

export const Type1 = (rule, value, callback) => {
    if (!value) {
        return callback(new Error('类型不能为空'));
    }
};

export const Type2 = (rule, value, callback) => {
    if (!value) {
        return callback(new Error('类型不能为空'));
    }
};

export const TypePut = (rule, value, callback) => {
    if (!value) {
        return callback(new Error('优惠码投放不能为空'));
    }
};

export const TypeTotalNum = (rule, value, callback) => {
    if (!value) {
        return callback(new Error('总数量控制不能为空'));
    }
};


export const TypeCode2_code = (rule, value, callback) => {
    if (!value) {
        return callback(new Error('优惠码不能为空'));
    }
};

export const TypeCode2_num = (rule, value, callback) => {
    if (!value) {
        return callback(new Error('使用次数限制不能为空'));
    }
};

















export const Mode = (rule, value, callback) => {
    if (!value) {
        return callback(new Error('优惠券方式不能为空'));
    }
};

export const Range = (rule, value, callback) => {
    if (!value) {
        return callback(new Error('使用范围不能为空'));
    }
};

export const StarTime = (rule, value, callback) => {
    if (!value) {
        return callback(new Error('上架时间不能为空'));
    }
};

export const EndTime = (rule, value, callback) => {
    if (!value) {
        return callback(new Error('下架时间不能为空'));
    }
};

export const ValidityTime = (rule, value, callback) => {
    if (!value) {
        return callback(new Error('使用范围不能为空'));
    }
};



////////

export const receiverType = (rule, value, callback) => {
  if (!value) {
    return callback(new Error('收件人不能为空'));
  }
};

export const messageReceivers = (rule, value, callback) => {

  if (!value || value==null || value=='') {
    return callback(new Error('文件不能为空'));
  }else {
    return callback();
  }
};

export const channel = (rule, value, callback) => {

  if (!value) {
    return callback(new Error('渠道不能为空'));
  }else if(value.length==0){
    return callback(new Error('渠道不能为空'));
  }
};


export const sendType = (rule, value, callback) => {
  if (!value) {
    return callback(new Error('收件人不能为空'));
  }
};
export const sendTime = (rule, value, callback) => {
  console.log(value)

  if (!value || value==null || value=='') {
    return callback(new Error('时间不能为空'));
  }else{
    return callback()
  }
};


export const isFocus = (rule, value, callback) => {

  if (!value || value==null || value=='') {
    return callback(new Error('焦点信息不能为空'));
  }else{
    return callback()
  }
};

export const contentType = (rule, value, callback) => {

  if (!value || value==null || value=='') {
    return callback(new Error('消息内容不能为空'));
  }else{
    return callback()
  }
};


